﻿using Abp.Application.Services.Dto;
using Abp.Extensions;
using Abp.Runtime.Validation;
using ARchGL.Platform.Dto;
using System;

namespace ARchGL.Platform.Dtos
{
    /// <summary>
    /// 文件库信息 InputModel
    /// </summary>
    public class QueryDocumentLibrarysInput : PagedSortedAndFilteredInputDto, IShouldNormalize
    {
        /// <summary>
        /// 主键标识（项目/人员等等）
        /// </summary>
        public Guid PrimaryId { get; set; }

        /// <summary>
        /// 验收节点标识
        /// </summary>
        public Guid? PrimaryId1 { get; set; }
        /// <summary>
        /// 上级分类
        /// </summary>
        public Guid ParentId { get; set; }
        /// <summary>
        /// 是否显示文件夹
        /// </summary>
        public bool ShowFloder { get; set; }

        /// <summary>
        /// 节点类型 空则查询全部节点类型
        /// </summary>
        public EnumDocumentPType? PType { get; set; }


        /// <summary>
        /// 查询节点类型
        /// </summary>
        public int[] PTypeArr { get; set; }

        public void Normalize()
        {
            if (Sorting.IsNullOrWhiteSpace())
            {
                Sorting = "CreationTime DESC";
            }
        }
    }
}
